home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ IE Search 2.xpl < prev    next >
Text File  |  2004-05-18  |  5KB  |  145 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="3"
  4. "UIPATH"="Internet\Internet Explorer\Address Bar"
  5. "NAME"="Address Bar Search"
  6. "VERSION"="1.02"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Add"
  9. "TEXT 2"="Edit"
  10. "TEXT 3"="Delete"
  11. "DESCRIPTION 1"="For Internet Explorer 6.0 and above: Internet Explorer supports a new featured called "Address Bar Search"."
  12. "DESCRIPTION 2"="You can define a keyword, e.g. "google" and enter this, plus the word it should search for into the address bar of IE. For example, you could simply enter "google Xteq" to perform a google search for "Xteq". This saves some time when you do research on the web."
  13. "DESCRIPTION 3"="This plug-in list all address bar search keywords, which you can edit, add new or delete."
  14. "DESCRIPTION 4"="After making changes, please restart Internet Explorer."
  15. "DESCRIPTION 5"="HINT: To add add new search engines here, simply do the following:"
  16. "DESCRIPTION 6"="- Go to the website of the search engine and search for a very strange word, e.g. "XoXoXoX"."
  17. "DESCRIPTION 7"="- Hit the "GO", "SEARCH" button or whatever the button is called on that site."
  18. "DESCRIPTION 8"="- When the results are displayed, copy the entire URL from the address bar of IE into the clipboard (CTRL+C)."
  19. "DESCRIPTION 9"="- Add a new entry with this plug-in and paste the URL (CTRL+V) into the second popup window."
  20. "DESCRIPTION 10"="- Before clicking on OK, change the strange word (e.g. XoXoXoX) in the URL to %s."
  21. "AUTHOR"="Xteq Systems"
  22. "CONTACTURL"="http://www.xteq.com"
  23. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  24. "COMMENT 1"="see http://www.jsiinc.com/SUBK/tip5400/rh5446.htm"
  25. "COMMENT 2"=" "
  26.  
  27.  
  28.  
  29. sPath="HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\"
  30.  
  31. dim iItems        'contains the total amount of the registry keys
  32. Dim aryItems()    'contains the name of the Registry paths (direct files starting with ".")
  33.  
  34.  
  35. Sub Plugin_Initialize 
  36.  iItems=0
  37.  
  38.  if RegPathExists(sPath) then
  39.     Call ReadRegistry
  40.  else
  41.     Call Disable
  42.  end if
  43. End Sub
  44.  
  45.  
  46. Sub ReadRegistry
  47.  for l=1 to iItems
  48.      Call SetUIElement(l,"")
  49.  next 
  50.  
  51.  iItems=RegEnumPaths(sPath) 
  52.  ReDim aryItems(iItems)
  53.  
  54.  For l=1 to iItems 
  55.      'save the name
  56.      sName=RegEnumElement(l)
  57.      aryItems(l)=sName
  58.      
  59.      sURL=RegReadValue(sPath & sName & "\@")
  60.      Call SetUIElement(l,sName & " (" & sURL & ")")
  61.    
  62.      'add common items
  63.      ' " "="+"
  64.      '"#"="%23"
  65.      '"&"="%26"
  66.      '"?"="%3F"
  67.      '"+"="%2B"
  68.      '"="="%3D"
  69.  next
  70.  
  71.  
  72. End Sub
  73.  
  74.  
  75.  
  76.  
  77. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  78.  if ElementIndex=1 then 'Add
  79.     sNewName=InputWindow("Please enter the keyword for this search, e.g. 'google'","",1)
  80.     if IsEmpty(sNewName)=false then
  81.        sNewURL=InputWindow("Please enter the complete URL for this search, including http:// and the parameter %s (e.g. 'http://www.google.com/search?q=%s'","",1)
  82.        if IsEmpty(sNewURL)=false then
  83.           Call RegWriteValue(sPath & sNewName & "\@",sNewURL,1)
  84.           Call ReadRegistry()
  85.        end if
  86.     end if
  87.  
  88.  
  89.  else 
  90.     if ElementSubIndex>0 then
  91.        sName=aryItems(ElementSubIndex)
  92.        sFullPath=sPath & sName
  93.        sURL=RegReadValue(sFullPath & "\@")
  94.  
  95.        if ElementIndex=2 then 'Edit
  96.           sNewName=InputWindow("Please enter the name for this search, e.g. 'google'",sName,1)
  97.  
  98.           if IsEmpty(sNewName)=false then
  99.              if sNewName<>sName then 
  100.                 'Name change!
  101.                 Call RegDeletePath(sFullPath)
  102.                 Call RegWriteValue(sPath & sNewName & "\@",sURL,1)
  103.                 sName=sNewName  
  104.              end if
  105.              
  106.              sNewURL=InputWindow("Please enter the complete URL for this search, including http:// and the parameter %s (e.g. 'http://www.google.com/search?q=%s'",sURL,1)
  107.           
  108.              if IsEmpty(sNewURL)=false then
  109.                 if sNewURL<>sURL then
  110.                    'URL change
  111.                    Call RegWriteValue(sPath & sName & "\@", sNewURL,1)
  112.                 end if
  113.              end if
  114.  
  115.              Call ReadRegistry()                   
  116.           end if
  117.  
  118.        else 'delete 
  119.           Call RegDeletePath(sFullPath)
  120.           Call ReadRegistry()
  121.        end if
  122.  
  123.     else
  124.        Call MsgError("Please select an item")
  125.     end if
  126.  end if
  127.  
  128. '       Call GetInfo(sGUID)
  129. '    else
  130. '       if bDeac=false then
  131. '          Call MoveFolder(sPath & sGUID, sPath & "-" & sGUID)
  132. '       else
  133. '          Call MoveFolder(sPath & "-" & sGUID, sPath & sGUID)
  134. '       end if      
  135.  
  136. '       Call ReadRegistry()  
  137. '       Call MsgInformation("Changes made!") 
  138. '    end if
  139.  
  140. End Sub
  141.  
  142.  
  143. Sub Plugin_Terminate 
  144. End Sub
  145.